package com.ashin.service;

import com.ashin.entity.bo.ChatBO;
import com.ashin.exception.ChatException;

import java.io.File;

/**
 * 交互服务
 *
 * @author ashinnotfound
 * @date 2022/12/10
 */
public interface InteractService {
    /**
     * 聊天
     *
     * @param chatBO 聊天BO
     * @return {@link String}
     * @throws ChatException 聊天异常
     */
    String chat(ChatBO chatBO) throws ChatException;


    /**
     * 聊天
     *
     * @param chatBO 聊天BO
     * @return {@link String}
     * @throws ChatException 聊天异常
     */
    String linkAiChat(ChatBO chatBO,boolean useGpt4) throws ChatException;


    /**
     * 聊天
     *
     * @param chatBO 聊天BO
     * @return {@link String}
     * @throws ChatException 聊天异常
     */
    String qwenChat(ChatBO chatBO) throws ChatException;

    /**
     * 聊天
     *
     * @param chatBO 聊天BO
     * @return {@link String}
     * @throws ChatException 聊天异常
     */
    String sdImageChat(ChatBO chatBO,String prompt) throws ChatException;
    String localImageChat(ChatBO chatBO,String prompt) throws ChatException;


    /**
     * 聊天
     *
     * @param chatBO 聊天BO
     * @return {@link String}
     * @throws ChatException 聊天异常
     */
    File audioChat(String model,ChatBO chatBO) throws ChatException;
    File textToAudio(String model,String text) throws ChatException;
}
